<?php $this->_extends('../_layouts/blank_layout'); ?>
<?php $this->_block('contents'); ?>
<head>
<title>采购单打印</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<?=Q::ini('custom_system/base_url')?>css/main.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.PageNext{page-break-after: always;}
.list { border:#000 solid 1px; border-collapse:collapse; margin-left: 1px; margin-top: 2px;}
.list tr { height:20px;}
.list th { font-weight: normal; border:#000 solid 1px;}
.list td { border:#000 solid 1px;}
.print {-moz-transform: rotate(90deg)}
</style>
</head>
<body>
<?foreach ($purchase_order as $p):?>
类型：<?=Helper_BSS_Normal::getIniOne('purchase_order_type', 'value', $p['type'], 'name')?>&nbsp;&nbsp;&nbsp;&nbsp;
单号：<?=$p['number']?>&nbsp;&nbsp;&nbsp;&nbsp;
日期：<?=$p['purchase_time']?>
<table class="list">
<tr>
	<th width="103"></th>
	<th width="400">产品</th>
	<th width="50">预计数</th>
	<th width="50">预计价</th>
	<th width="150">预计供应商</th>
	<th width="50">实际数</th>
	<th width="50">实际价</th>
	<th width="150">实际供应商</th>
	<th width="100">备注</th>
</tr>
<?foreach ($p['item'] as $i):?>
<tr>
	<td>
		<?if ($i['pic_url']):?>
		<img src="<?=$i['pic_url'][0]?>" height="100" />
		<?endif;?>
	</td>
	<td><?=$i['number']?>&nbsp;<?=$i['product_name']?></td>
	<td align="center"><?=$i['budget_quantity']?></td>
	<td align="center"><?=$i['budget_price']?sprintf('%.2f', $i['budget_price']):''?></td>
	<td align="center"><?=$i['budget_provider_name']?></td>
	<td align="center"><?=$i['actual_quantity']?></td>
	<td align="center"><?=$i['actual_price']?sprintf('%.2f', $i['actual_price']):''?></td>
	<td align="center"><?=$i['actual_provider_name']?></td>
	<td><?=$i['notes']?></td>
</tr>
<?endforeach;?>
</table>
备注：<?=$p['notes']?>
<br />
制单人：<?=$p['make_user_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
经手采购员：<?=$p['purchase_user_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
采购审核：<?=$p['purchase_audit_user_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
仓库入库审核：<?=$p['storage_audit_user_name']?>&nbsp;&nbsp;&nbsp;&nbsp;
<div class="PageNext"></div>
<?endforeach;?>
</body>
<?php $this->_endblock();?>